/** \file led.h
 **
 ** LED driver
 **
 ** History:
 **   -
 *****************************************************************************/
#ifndef _LED_H_
#define _LED_H_
/*****************************************************************************/
/* Include files                                                             */
/*****************************************************************************/
#include "mcu.h"
#include "base_types_l3.h"
/*****************************************************************************/
/* Global pre-processor symbols/macros ('#define')                           */
/*****************************************************************************/

#define	ON		0
#define OFF		1
#define BLINK 	3

#define	LED_NUM	9

#define LED1	0
#define	LED2	1
#define LED3	2
#define	LED4	3
#define LED5	4
#define	LED6	5
#define LED7	6
#define	LED8	7
#define LED9	8

#define LED_DDR		FM3_GPIO->DDR0
#define LED_PFR		FM3_GPIO->PFR0
#define LED_MASK	0x6FE0
/*****************************************************************************/
/* Global variable declarations ('extern', definition in C source)           */
/*****************************************************************************/
extern volatile unsigned int* led_array[LED_NUM];
extern boolean_t led_fast_blank_array[LED_NUM];
extern boolean_t led_slow_blank_array[LED_NUM];
/*****************************************************************************/
/* Global function prototypes ('extern', definition in C source)             */
/*****************************************************************************/
void LED_Init(void);
void LED_on(uint8_t led);
void LED_off(uint8_t led);
void LED_slow_blank(uint8_t led);
void LED_fast_blank(uint8_t led);

#endif

